<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>IgH EtherCAT Master: mailbox.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">IgH EtherCAT Master
   &#160;<span id="projectnumber">1.5.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('mailbox_8c_source.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">mailbox.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="mailbox_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *  $Id: mailbox.c,v c0b4c64fcebd 2012/12/07 18:51:55 fp $</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *  Copyright (C) 2006-2008  Florian Pose, Ingenieurgemeinschaft IgH</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *  This file is part of the IgH EtherCAT Master.</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *  The IgH EtherCAT Master is free software; you can redistribute it and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *  modify it under the terms of the GNU General Public License version 2, as</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *  published by the Free Software Foundation.</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *  The IgH EtherCAT Master is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *  but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *  Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *  You should have received a copy of the GNU General Public License along</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> *  with the IgH EtherCAT Master; if not, write to the Free Software</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *  ---</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> *  The license mentioned above concerns the source code only. Using the</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> *  EtherCAT technology and brand is only permitted in compliance with the</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> *  industrial property and similar rights of Beckhoff Automation GmbH.</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> *****************************************************************************/</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;linux/slab.h&gt;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &lt;linux/delay.h&gt;</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="mailbox_8h.html">mailbox.h</a>&quot;</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="datagram_8h.html">datagram.h</a>&quot;</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="master_8h.html">master.h</a>&quot;</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="mailbox_8h.html#ab3a5be80064e09c9e7194d155c62cae8">   51</a></span>&#160;uint8_t *<a class="code" href="mailbox_8c.html#aff114bf121b61ff9b310a228de80ca3e">ec_slave_mbox_prepare_send</a>(<span class="keyword">const</span> <a class="code" href="structec__slave.html">ec_slave_t</a> *slave, </div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;                                    <a class="code" href="structec__datagram__t.html">ec_datagram_t</a> *datagram, </div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                                    uint8_t type, </div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;                                    <span class="keywordtype">size_t</span> size </div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                                    )</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;{</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordtype">size_t</span> total_size;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordtype">int</span> ret;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordflow">if</span> (unlikely(!slave-&gt;<a class="code" href="structec__slave.html#a081433f5a30f9352fbc4363093ae1e16">sii</a>.<a class="code" href="structec__sii__t.html#a7740732efd267741b956b8912502d8a1">mailbox_protocols</a>)) {</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <a class="code" href="slave_8h.html#a39519c3172e4196e40fa9006fb801612">EC_SLAVE_ERR</a>(slave, <span class="stringliteral">&quot;Slave does not support mailbox&quot;</span></div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                <span class="stringliteral">&quot; communication!\n&quot;</span>);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keywordflow">return</span> ERR_PTR(-EPROTONOSUPPORT);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    }</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    total_size = <a class="code" href="globals_8h.html#a189582ffd5ea94b41b00482c04968291">EC_MBOX_HEADER_SIZE</a> + size;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="keywordflow">if</span> (unlikely(total_size &gt; slave-&gt;<a class="code" href="structec__slave.html#a0310afbbf38da2a92cdbe3911a46535c">configured_rx_mailbox_size</a>)) {</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <a class="code" href="slave_8h.html#a39519c3172e4196e40fa9006fb801612">EC_SLAVE_ERR</a>(slave, <span class="stringliteral">&quot;Data size (%zu) does not fit in mailbox (%u)!\n&quot;</span>,</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                total_size, slave-&gt;<a class="code" href="structec__slave.html#a0310afbbf38da2a92cdbe3911a46535c">configured_rx_mailbox_size</a>);</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <span class="keywordflow">return</span> ERR_PTR(-EOVERFLOW);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    }</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    ret = <a class="code" href="datagram_8c.html#ad34b69b7bf678ec548bd09d3ec4027d6">ec_datagram_fpwr</a>(datagram, slave-&gt;<a class="code" href="structec__slave.html#ae4c26b32979bcb21cf391ca3b170d701">station_address</a>,</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;            slave-&gt;<a class="code" href="structec__slave.html#a885011c3377eacc3513c7806db9ea4d4">configured_rx_mailbox_offset</a>,</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            slave-&gt;<a class="code" href="structec__slave.html#a0310afbbf38da2a92cdbe3911a46535c">configured_rx_mailbox_size</a>);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordflow">if</span> (ret)</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordflow">return</span> ERR_PTR(ret);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <a class="code" href="group__ApplicationInterface.html#gace219530ddd83f5f3f54d5b329b94a3d">EC_WRITE_U16</a>(datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a>,     size); <span class="comment">// mailbox service data length</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <a class="code" href="group__ApplicationInterface.html#gace219530ddd83f5f3f54d5b329b94a3d">EC_WRITE_U16</a>(datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a> + 2, slave-&gt;<a class="code" href="structec__slave.html#ae4c26b32979bcb21cf391ca3b170d701">station_address</a>); <span class="comment">// station addr.</span></div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <a class="code" href="group__ApplicationInterface.html#ga42e7df5376954bc1cf1dde11fbf17387">EC_WRITE_U8</a> (datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a> + 4, 0x00); <span class="comment">// channel &amp; priority</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <a class="code" href="group__ApplicationInterface.html#ga42e7df5376954bc1cf1dde11fbf17387">EC_WRITE_U8</a> (datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a> + 5, type); <span class="comment">// underlying protocol type</span></div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="keywordflow">return</span> datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a> + <a class="code" href="globals_8h.html#a189582ffd5ea94b41b00482c04968291">EC_MBOX_HEADER_SIZE</a>;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;}</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="mailbox_8h.html#a9c9f8f70db11c581795e7520c10bb623">   96</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="mailbox_8c.html#a950eb8623a9b1b0fc96eb1831d483fa1">ec_slave_mbox_prepare_check</a>(<span class="keyword">const</span> <a class="code" href="structec__slave.html">ec_slave_t</a> *slave, </div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                                <a class="code" href="structec__datagram__t.html">ec_datagram_t</a> *datagram </div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;                                )</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;{</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordtype">int</span> ret = <a class="code" href="datagram_8c.html#ae9a50bd9874a22d2f62a17973c042e9b">ec_datagram_fprd</a>(datagram, slave-&gt;<a class="code" href="structec__slave.html#ae4c26b32979bcb21cf391ca3b170d701">station_address</a>, 0x808, 8);</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordflow">if</span> (ret)</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <a class="code" href="datagram_8c.html#a56f873f563806b58344e8d5da6b0a53d">ec_datagram_zero</a>(datagram);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;}</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="mailbox_8h.html#a4d932f3a3716b07460950cf795e89891">  115</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="mailbox_8c.html#af94312f9670053f23ca657e564e196f4">ec_slave_mbox_check</a>(<span class="keyword">const</span> <a class="code" href="structec__datagram__t.html">ec_datagram_t</a> *datagram )</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;{</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="group__ApplicationInterface.html#gabfd606064b98475fc6cbe52aea6b5133">EC_READ_U8</a>(datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a> + 5) &amp; 8 ? 1 : 0;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;}</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="mailbox_8h.html#a6c8ab58f4b9c8d78153e5d0403bae40b">  127</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="mailbox_8c.html#ad3ef95e0166428713cd299410a747095">ec_slave_mbox_prepare_fetch</a>(<span class="keyword">const</span> <a class="code" href="structec__slave.html">ec_slave_t</a> *slave, </div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                                <a class="code" href="structec__datagram__t.html">ec_datagram_t</a> *datagram </div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;                                )</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;{</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="keywordtype">int</span> ret = <a class="code" href="datagram_8c.html#ae9a50bd9874a22d2f62a17973c042e9b">ec_datagram_fprd</a>(datagram, slave-&gt;<a class="code" href="structec__slave.html#ae4c26b32979bcb21cf391ca3b170d701">station_address</a>,</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            slave-&gt;<a class="code" href="structec__slave.html#a365e2116bd54803112c56cb3a98970cb">configured_tx_mailbox_offset</a>,</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            slave-&gt;<a class="code" href="structec__slave.html#a79ecaa06844f2b8bf2d1b4d9bfae9207">configured_tx_mailbox_size</a>);</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keywordflow">if</span> (ret)</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <a class="code" href="datagram_8c.html#a56f873f563806b58344e8d5da6b0a53d">ec_datagram_zero</a>(datagram);</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;}</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="mailbox_8c.html#a38d51351bd6f8415a033c027c5e39a3a">  147</a></span>&#160;<span class="keyword">const</span> <a class="code" href="structec__code__msg__t.html">ec_code_msg_t</a> <a class="code" href="mailbox_8c.html#a38d51351bd6f8415a033c027c5e39a3a">mbox_error_messages</a>[] = {</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    {0x00000001, <span class="stringliteral">&quot;MBXERR_SYNTAX&quot;</span>},</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    {0x00000002, <span class="stringliteral">&quot;MBXERR_UNSUPPORTEDPROTOCOL&quot;</span>},</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    {0x00000003, <span class="stringliteral">&quot;MBXERR_INVAILDCHANNEL&quot;</span>},</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    {0x00000004, <span class="stringliteral">&quot;MBXERR_SERVICENOTSUPPORTED&quot;</span>},</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    {0x00000005, <span class="stringliteral">&quot;MBXERR_INVALIDHEADER&quot;</span>},</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    {0x00000006, <span class="stringliteral">&quot;MBXERR_SIZETOOSHORT&quot;</span>},</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    {0x00000007, <span class="stringliteral">&quot;MBXERR_NOMOREMEMORY&quot;</span>},</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    {0x00000008, <span class="stringliteral">&quot;MBXERR_INVALIDSIZE&quot;</span>},</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    {}</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;};</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="mailbox_8h.html#a9845c6e71e538cdaf2af6000b16f60c9">  165</a></span>&#160;uint8_t *<a class="code" href="mailbox_8c.html#a0a7345dc67c23f69cabf29a16aad5802">ec_slave_mbox_fetch</a>(<span class="keyword">const</span> <a class="code" href="structec__slave.html">ec_slave_t</a> *slave, </div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;                             <span class="keyword">const</span> <a class="code" href="structec__datagram__t.html">ec_datagram_t</a> *datagram, </div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;                             uint8_t *type, </div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;                             <span class="keywordtype">size_t</span> *size </div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;                             )</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;{</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keywordtype">size_t</span> data_size;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    data_size = <a class="code" href="group__ApplicationInterface.html#gaa78148947379983986940d1980ac3db1">EC_READ_U16</a>(datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a>);</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <span class="keywordflow">if</span> (data_size + <a class="code" href="globals_8h.html#a189582ffd5ea94b41b00482c04968291">EC_MBOX_HEADER_SIZE</a> &gt; slave-&gt;<a class="code" href="structec__slave.html#a79ecaa06844f2b8bf2d1b4d9bfae9207">configured_tx_mailbox_size</a>) {</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <a class="code" href="slave_8h.html#a39519c3172e4196e40fa9006fb801612">EC_SLAVE_ERR</a>(slave, <span class="stringliteral">&quot;Corrupt mailbox response received!\n&quot;</span>);</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <a class="code" href="globals_8h.html#af9b1cee5f8eb11448141bd02d52f44ac">ec_print_data</a>(datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a>, slave-&gt;<a class="code" href="structec__slave.html#a79ecaa06844f2b8bf2d1b4d9bfae9207">configured_tx_mailbox_size</a>);</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        <span class="keywordflow">return</span> ERR_PTR(-EPROTO);</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    }</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    *type = <a class="code" href="group__ApplicationInterface.html#gabfd606064b98475fc6cbe52aea6b5133">EC_READ_U8</a>(datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a> + 5) &amp; 0x0F;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    *size = data_size;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    <span class="keywordflow">if</span> (*type == 0x00) {</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="keyword">const</span> <a class="code" href="structec__code__msg__t.html">ec_code_msg_t</a> *mbox_msg;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        uint16_t code = <a class="code" href="group__ApplicationInterface.html#gaa78148947379983986940d1980ac3db1">EC_READ_U16</a>(datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a> + 8);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <a class="code" href="slave_8h.html#a39519c3172e4196e40fa9006fb801612">EC_SLAVE_ERR</a>(slave, <span class="stringliteral">&quot;Mailbox error response received - &quot;</span>);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        <span class="keywordflow">for</span> (mbox_msg = mbox_error_messages; mbox_msg-&gt;<a class="code" href="structec__code__msg__t.html#a21dd735111c4e487365bf7570fda697d">code</a>; mbox_msg++) {</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;            <span class="keywordflow">if</span> (mbox_msg-&gt;<a class="code" href="structec__code__msg__t.html#a21dd735111c4e487365bf7570fda697d">code</a> != code)</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;                <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;            printk(<span class="stringliteral">&quot;Code 0x%04X: \&quot;%s\&quot;.\n&quot;</span>,</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;                    mbox_msg-&gt;<a class="code" href="structec__code__msg__t.html#a21dd735111c4e487365bf7570fda697d">code</a>, mbox_msg-&gt;<a class="code" href="structec__code__msg__t.html#a9b1fef025e25828a20170a275c5976e3">message</a>);</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;            <span class="keywordflow">break</span>;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        }</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <span class="keywordflow">if</span> (!mbox_msg-&gt;<a class="code" href="structec__code__msg__t.html#a21dd735111c4e487365bf7570fda697d">code</a>)</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;            printk(<span class="stringliteral">&quot;Unknown error reply code 0x%04X.\n&quot;</span>, code);</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keywordflow">if</span> (slave-&gt;<a class="code" href="structec__slave.html#ae3ca485627d212610814bf4e0130eddd">master</a>-&gt;<a class="code" href="structec__master.html#abdecf290f3f7f2af1b2a7bf0d9c7b08d">debug_level</a>)</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;            <a class="code" href="globals_8h.html#af9b1cee5f8eb11448141bd02d52f44ac">ec_print_data</a>(datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a> + <a class="code" href="globals_8h.html#a189582ffd5ea94b41b00482c04968291">EC_MBOX_HEADER_SIZE</a>, data_size);</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="keywordflow">return</span> ERR_PTR(-EPROTO);</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    }</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="keywordflow">return</span> datagram-&gt;<a class="code" href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">data</a> + <a class="code" href="globals_8h.html#a189582ffd5ea94b41b00482c04968291">EC_MBOX_HEADER_SIZE</a>;</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;}</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;<span class="comment">/*****************************************************************************/</span></div><div class="ttc" id="mailbox_8c_html_aff114bf121b61ff9b310a228de80ca3e"><div class="ttname"><a href="mailbox_8c.html#aff114bf121b61ff9b310a228de80ca3e">ec_slave_mbox_prepare_send</a></div><div class="ttdeci">uint8_t * ec_slave_mbox_prepare_send(const ec_slave_t *slave, ec_datagram_t *datagram, uint8_t type, size_t size)</div><div class="ttdoc">Prepares a mailbox-send datagram. </div><div class="ttdef"><b>Definition:</b> <a href="mailbox_8c_source.html#l00051">mailbox.c:51</a></div></div>
<div class="ttc" id="structec__slave_html_a081433f5a30f9352fbc4363093ae1e16"><div class="ttname"><a href="structec__slave.html#a081433f5a30f9352fbc4363093ae1e16">ec_slave::sii</a></div><div class="ttdeci">ec_sii_t sii</div><div class="ttdoc">Extracted SII data. </div><div class="ttdef"><b>Definition:</b> <a href="slave_8h_source.html#l00223">slave.h:223</a></div></div>
<div class="ttc" id="mailbox_8c_html_a0a7345dc67c23f69cabf29a16aad5802"><div class="ttname"><a href="mailbox_8c.html#a0a7345dc67c23f69cabf29a16aad5802">ec_slave_mbox_fetch</a></div><div class="ttdeci">uint8_t * ec_slave_mbox_fetch(const ec_slave_t *slave, const ec_datagram_t *datagram, uint8_t *type, size_t *size)</div><div class="ttdoc">Processes received mailbox data. </div><div class="ttdef"><b>Definition:</b> <a href="mailbox_8c_source.html#l00165">mailbox.c:165</a></div></div>
<div class="ttc" id="structec__slave_html_a79ecaa06844f2b8bf2d1b4d9bfae9207"><div class="ttname"><a href="structec__slave.html#a79ecaa06844f2b8bf2d1b4d9bfae9207">ec_slave::configured_tx_mailbox_size</a></div><div class="ttdeci">uint16_t configured_tx_mailbox_size</div><div class="ttdoc">Configured send mailbox size. </div><div class="ttdef"><b>Definition:</b> <a href="slave_8h_source.html#l00201">slave.h:201</a></div></div>
<div class="ttc" id="structec__slave_html_a365e2116bd54803112c56cb3a98970cb"><div class="ttname"><a href="structec__slave.html#a365e2116bd54803112c56cb3a98970cb">ec_slave::configured_tx_mailbox_offset</a></div><div class="ttdeci">uint16_t configured_tx_mailbox_offset</div><div class="ttdoc">Configured send mailbox offset. </div><div class="ttdef"><b>Definition:</b> <a href="slave_8h_source.html#l00199">slave.h:199</a></div></div>
<div class="ttc" id="mailbox_8c_html_ad3ef95e0166428713cd299410a747095"><div class="ttname"><a href="mailbox_8c.html#ad3ef95e0166428713cd299410a747095">ec_slave_mbox_prepare_fetch</a></div><div class="ttdeci">int ec_slave_mbox_prepare_fetch(const ec_slave_t *slave, ec_datagram_t *datagram)</div><div class="ttdoc">Prepares a datagram to fetch mailbox data. </div><div class="ttdef"><b>Definition:</b> <a href="mailbox_8c_source.html#l00127">mailbox.c:127</a></div></div>
<div class="ttc" id="structec__code__msg__t_html_a21dd735111c4e487365bf7570fda697d"><div class="ttname"><a href="structec__code__msg__t.html#a21dd735111c4e487365bf7570fda697d">ec_code_msg_t::code</a></div><div class="ttdeci">uint32_t code</div><div class="ttdoc">Code. </div><div class="ttdef"><b>Definition:</b> <a href="globals_8h_source.html#l00279">globals.h:279</a></div></div>
<div class="ttc" id="structec__datagram__t_html"><div class="ttname"><a href="structec__datagram__t.html">ec_datagram_t</a></div><div class="ttdoc">EtherCAT datagram. </div><div class="ttdef"><b>Definition:</b> <a href="datagram_8h_source.html#l00087">datagram.h:87</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_ga42e7df5376954bc1cf1dde11fbf17387"><div class="ttname"><a href="group__ApplicationInterface.html#ga42e7df5376954bc1cf1dde11fbf17387">EC_WRITE_U8</a></div><div class="ttdeci">#define EC_WRITE_U8(DATA, VAL)</div><div class="ttdoc">Write an 8-bit unsigned value to EtherCAT data. </div><div class="ttdef"><b>Definition:</b> <a href="ecrt_8h_source.html#l02187">ecrt.h:2187</a></div></div>
<div class="ttc" id="structec__slave_html_ae4c26b32979bcb21cf391ca3b170d701"><div class="ttname"><a href="structec__slave.html#ae4c26b32979bcb21cf391ca3b170d701">ec_slave::station_address</a></div><div class="ttdeci">uint16_t station_address</div><div class="ttdoc">Configured station address. </div><div class="ttdef"><b>Definition:</b> <a href="slave_8h_source.html#l00184">slave.h:184</a></div></div>
<div class="ttc" id="structec__code__msg__t_html_a9b1fef025e25828a20170a275c5976e3"><div class="ttname"><a href="structec__code__msg__t.html#a9b1fef025e25828a20170a275c5976e3">ec_code_msg_t::message</a></div><div class="ttdeci">const char * message</div><div class="ttdoc">Message belonging to code. </div><div class="ttdef"><b>Definition:</b> <a href="globals_8h_source.html#l00280">globals.h:280</a></div></div>
<div class="ttc" id="master_8h_html"><div class="ttname"><a href="master_8h.html">master.h</a></div><div class="ttdoc">EtherCAT master structure. </div></div>
<div class="ttc" id="structec__slave_html"><div class="ttname"><a href="structec__slave.html">ec_slave</a></div><div class="ttdoc">EtherCAT slave. </div><div class="ttdef"><b>Definition:</b> <a href="slave_8h_source.html#l00176">slave.h:176</a></div></div>
<div class="ttc" id="datagram_8c_html_a56f873f563806b58344e8d5da6b0a53d"><div class="ttname"><a href="datagram_8c.html#a56f873f563806b58344e8d5da6b0a53d">ec_datagram_zero</a></div><div class="ttdeci">void ec_datagram_zero(ec_datagram_t *datagram)</div><div class="ttdoc">Fills the datagram payload memory with zeros. </div><div class="ttdef"><b>Definition:</b> <a href="datagram_8c_source.html#l00178">datagram.c:178</a></div></div>
<div class="ttc" id="structec__code__msg__t_html"><div class="ttname"><a href="structec__code__msg__t.html">ec_code_msg_t</a></div><div class="ttdoc">Code/Message pair. </div><div class="ttdef"><b>Definition:</b> <a href="globals_8h_source.html#l00278">globals.h:278</a></div></div>
<div class="ttc" id="structec__sii__t_html_a7740732efd267741b956b8912502d8a1"><div class="ttname"><a href="structec__sii__t.html#a7740732efd267741b956b8912502d8a1">ec_sii_t::mailbox_protocols</a></div><div class="ttdeci">uint16_t mailbox_protocols</div><div class="ttdoc">Supported mailbox protocols. </div><div class="ttdef"><b>Definition:</b> <a href="slave_8h_source.html#l00147">slave.h:147</a></div></div>
<div class="ttc" id="structec__master_html_abdecf290f3f7f2af1b2a7bf0d9c7b08d"><div class="ttname"><a href="structec__master.html#abdecf290f3f7f2af1b2a7bf0d9c7b08d">ec_master::debug_level</a></div><div class="ttdeci">unsigned int debug_level</div><div class="ttdoc">Master debug level. </div><div class="ttdef"><b>Definition:</b> <a href="master_8h_source.html#l00286">master.h:286</a></div></div>
<div class="ttc" id="slave_8h_html_a39519c3172e4196e40fa9006fb801612"><div class="ttname"><a href="slave_8h.html#a39519c3172e4196e40fa9006fb801612">EC_SLAVE_ERR</a></div><div class="ttdeci">#define EC_SLAVE_ERR(slave, fmt, args...)</div><div class="ttdoc">Convenience macro for printing slave-specific errors to syslog. </div><div class="ttdef"><b>Definition:</b> <a href="slave_8h_source.html#l00076">slave.h:76</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_gace219530ddd83f5f3f54d5b329b94a3d"><div class="ttname"><a href="group__ApplicationInterface.html#gace219530ddd83f5f3f54d5b329b94a3d">EC_WRITE_U16</a></div><div class="ttdeci">#define EC_WRITE_U16(DATA, VAL)</div><div class="ttdoc">Write a 16-bit unsigned value to EtherCAT data. </div><div class="ttdef"><b>Definition:</b> <a href="ecrt_8h_source.html#l02204">ecrt.h:2204</a></div></div>
<div class="ttc" id="structec__slave_html_a885011c3377eacc3513c7806db9ea4d4"><div class="ttname"><a href="structec__slave.html#a885011c3377eacc3513c7806db9ea4d4">ec_slave::configured_rx_mailbox_offset</a></div><div class="ttdeci">uint16_t configured_rx_mailbox_offset</div><div class="ttdoc">Configured receive mailbox offset. </div><div class="ttdef"><b>Definition:</b> <a href="slave_8h_source.html#l00195">slave.h:195</a></div></div>
<div class="ttc" id="structec__slave_html_ae3ca485627d212610814bf4e0130eddd"><div class="ttname"><a href="structec__slave.html#ae3ca485627d212610814bf4e0130eddd">ec_slave::master</a></div><div class="ttdeci">ec_master_t * master</div><div class="ttdoc">Master owning the slave. </div><div class="ttdef"><b>Definition:</b> <a href="slave_8h_source.html#l00178">slave.h:178</a></div></div>
<div class="ttc" id="datagram_8c_html_ad34b69b7bf678ec548bd09d3ec4027d6"><div class="ttname"><a href="datagram_8c.html#ad34b69b7bf678ec548bd09d3ec4027d6">ec_datagram_fpwr</a></div><div class="ttdeci">int ec_datagram_fpwr(ec_datagram_t *datagram, uint16_t configured_address, uint16_t mem_address, size_t data_size)</div><div class="ttdoc">Initializes an EtherCAT FPWR datagram. </div><div class="ttdef"><b>Definition:</b> <a href="datagram_8c_source.html#l00298">datagram.c:298</a></div></div>
<div class="ttc" id="datagram_8c_html_ae9a50bd9874a22d2f62a17973c042e9b"><div class="ttname"><a href="datagram_8c.html#ae9a50bd9874a22d2f62a17973c042e9b">ec_datagram_fprd</a></div><div class="ttdeci">int ec_datagram_fprd(ec_datagram_t *datagram, uint16_t configured_address, uint16_t mem_address, size_t data_size)</div><div class="ttdoc">Initializes an EtherCAT FPRD datagram. </div><div class="ttdef"><b>Definition:</b> <a href="datagram_8c_source.html#l00273">datagram.c:273</a></div></div>
<div class="ttc" id="datagram_8h_html"><div class="ttname"><a href="datagram_8h.html">datagram.h</a></div><div class="ttdoc">EtherCAT datagram structure. </div></div>
<div class="ttc" id="mailbox_8c_html_a38d51351bd6f8415a033c027c5e39a3a"><div class="ttname"><a href="mailbox_8c.html#a38d51351bd6f8415a033c027c5e39a3a">mbox_error_messages</a></div><div class="ttdeci">const ec_code_msg_t mbox_error_messages[]</div><div class="ttdoc">Mailbox error codes. </div><div class="ttdef"><b>Definition:</b> <a href="mailbox_8c_source.html#l00147">mailbox.c:147</a></div></div>
<div class="ttc" id="globals_8h_html_a189582ffd5ea94b41b00482c04968291"><div class="ttname"><a href="globals_8h.html#a189582ffd5ea94b41b00482c04968291">EC_MBOX_HEADER_SIZE</a></div><div class="ttdeci">#define EC_MBOX_HEADER_SIZE</div><div class="ttdoc">Mailbox header size. </div><div class="ttdef"><b>Definition:</b> <a href="globals_8h_source.html#l00095">globals.h:95</a></div></div>
<div class="ttc" id="globals_8h_html_af9b1cee5f8eb11448141bd02d52f44ac"><div class="ttname"><a href="globals_8h.html#af9b1cee5f8eb11448141bd02d52f44ac">ec_print_data</a></div><div class="ttdeci">void ec_print_data(const uint8_t *, size_t)</div><div class="ttdoc">Outputs frame contents for debugging purposes. </div><div class="ttdef"><b>Definition:</b> <a href="module_8c_source.html#l00341">module.c:341</a></div></div>
<div class="ttc" id="mailbox_8c_html_a950eb8623a9b1b0fc96eb1831d483fa1"><div class="ttname"><a href="mailbox_8c.html#a950eb8623a9b1b0fc96eb1831d483fa1">ec_slave_mbox_prepare_check</a></div><div class="ttdeci">int ec_slave_mbox_prepare_check(const ec_slave_t *slave, ec_datagram_t *datagram)</div><div class="ttdoc">Prepares a datagram for checking the mailbox state. </div><div class="ttdef"><b>Definition:</b> <a href="mailbox_8c_source.html#l00096">mailbox.c:96</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_gaa78148947379983986940d1980ac3db1"><div class="ttname"><a href="group__ApplicationInterface.html#gaa78148947379983986940d1980ac3db1">EC_READ_U16</a></div><div class="ttdeci">#define EC_READ_U16(DATA)</div><div class="ttdoc">Read a 16-bit unsigned value from EtherCAT data. </div><div class="ttdef"><b>Definition:</b> <a href="ecrt_8h_source.html#l02135">ecrt.h:2135</a></div></div>
<div class="ttc" id="mailbox_8h_html"><div class="ttname"><a href="mailbox_8h.html">mailbox.h</a></div><div class="ttdoc">Mailbox functionality. </div></div>
<div class="ttc" id="structec__slave_html_a0310afbbf38da2a92cdbe3911a46535c"><div class="ttname"><a href="structec__slave.html#a0310afbbf38da2a92cdbe3911a46535c">ec_slave::configured_rx_mailbox_size</a></div><div class="ttdeci">uint16_t configured_rx_mailbox_size</div><div class="ttdoc">Configured receive mailbox size. </div><div class="ttdef"><b>Definition:</b> <a href="slave_8h_source.html#l00197">slave.h:197</a></div></div>
<div class="ttc" id="structec__datagram__t_html_ae7471d08444f2bc780532e9268859296"><div class="ttname"><a href="structec__datagram__t.html#ae7471d08444f2bc780532e9268859296">ec_datagram_t::data</a></div><div class="ttdeci">uint8_t * data</div><div class="ttdoc">Datagram payload. </div><div class="ttdef"><b>Definition:</b> <a href="datagram_8h_source.html#l00094">datagram.h:94</a></div></div>
<div class="ttc" id="group__ApplicationInterface_html_gabfd606064b98475fc6cbe52aea6b5133"><div class="ttname"><a href="group__ApplicationInterface.html#gabfd606064b98475fc6cbe52aea6b5133">EC_READ_U8</a></div><div class="ttdeci">#define EC_READ_U8(DATA)</div><div class="ttdoc">Read an 8-bit unsigned value from EtherCAT data. </div><div class="ttdef"><b>Definition:</b> <a href="ecrt_8h_source.html#l02119">ecrt.h:2119</a></div></div>
<div class="ttc" id="mailbox_8c_html_af94312f9670053f23ca657e564e196f4"><div class="ttname"><a href="mailbox_8c.html#af94312f9670053f23ca657e564e196f4">ec_slave_mbox_check</a></div><div class="ttdeci">int ec_slave_mbox_check(const ec_datagram_t *datagram)</div><div class="ttdoc">Processes a mailbox state checking datagram. </div><div class="ttdef"><b>Definition:</b> <a href="mailbox_8c_source.html#l00115">mailbox.c:115</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_c1346cf4828efdd0d2baf0d391d01b77.html">master</a></li><li class="navelem"><a class="el" href="mailbox_8c.html">mailbox.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
